package folexpr.compiler.visitors;

import folexpr.compiler.CompilerConstants;
import folexpr.compiler.visitors.a0_dumplines.DumpLinesVisitResult;
import folexpr.compiler.visitors.a1_close.ClosedFormVisitResult;
import folexpr.compiler.visitors.b_implication.ImplicReductionVisitResult;
import folexpr.compiler.visitors.c_negation.NegReductionVisitResultNew;
import folexpr.compiler.visitors.e_movequantahead.QuantificationsAHeadVisitResult;
import folexpr.compiler.visitors.f_prenexcong.CongPrenexFormVisitResult;
import folexpr.compiler.visitors.i_removebracket.RemoveUnneededBracketVisitResult;

public class VisitResultFactory
{
	public VisitResult getVisitResultInstance(String op)
	{
		VisitResult result = null;
		
		if (op.equals(CompilerConstants.DUMP_LINES)) 
			result = new DumpLinesVisitResult();
		
		if (op.equals(CompilerConstants.CLOSE)) 
			result = new ClosedFormVisitResult();
		
		if (op.equals(CompilerConstants.IMPL_RED)) 
			result = new ImplicReductionVisitResult();
		
		if (op.equals(CompilerConstants.NEG_RED)) 
			result = new NegReductionVisitResultNew();
		
		if (op.equals(CompilerConstants.VAR_REN)) 
			result = new VisitResult();
		
		if (op.equals(CompilerConstants.QUANT_AHEAD))
			result = new QuantificationsAHeadVisitResult();
		
		if (op.equals(CompilerConstants.PRENEX_CONG))
			result = new CongPrenexFormVisitResult();
		
		if (op.equals(CompilerConstants.SKOLEM)) 
			result = new VisitResult();
		
		if (op.equals(CompilerConstants.REMOVE_FORALL))
			result = new VisitResult();
		
		if (op.equals(CompilerConstants.REMOVE_BRACKET)) 
			result = new RemoveUnneededBracketVisitResult();

		if (result == null) result = new VisitResult();
		
		return result;
	}
}
